var fs = require("fs");
var readline = require("readline");

// 获取文件有多少行
// 获取文件输入
var rl = readline.createInterface({
  input: fs.createReadStream("./data/file1.txt"),
});

var lineNum = 0;
rl.on("line", function (line) {
  lineNum++;
});
rl.on("close", function () {
  console.log("lineNum", lineNum);
});
